<?php
	echo '<!DOCTYPE html>';
	echo '<html>';
	echo '<head>';
	echo '<title>Get Work Order Web</title>';
	echo '<meta http-equiv="content-type" content="text/html;charset=utf-8">';
	echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
	echo '<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">-->';
	echo '<link rel="stylesheet" href="/css/bootstrap.min.css">';
	echo '<script src="/js/jquery.min.js"></script>';
	echo '<script src="/js/bootstrap.min.js"></script>';
	echo '</head>';
	echo '<body>';

	extract($_POST);
	extract($_GET);
	unset($_POST,$_GET);

	$sn=strtoupper(trim($sn)); // add remove left and right string space

	include 'inc/conn.php';
	include "top.php";
	echo "<div class='container-fluid'>";
	echo "<div style='float:left'>";
	echo "	<form action='getworkorder.php?act=q' method='POST' role='form' class='form-inline'>";
	echo "		<div class='form-group'>";
	echo "			<label for='inputSN' class='col-sm-4 form-control'>机器序号</label>";
	if(strlen($sn)<=0){
		echo "			<input type='text' class='form-control' name='sn' id='inputSN' placeholder='请输入机器序号'>";
	}else{
		echo "			<input type='text' class='form-control' name='sn' id='inputSN' value='$sn'>";
	}
	echo "			<button type='submit' class='btn btn-info form-control'>查询</button>";
	echo "		</div>";
	echo "	</form>";
	echo "</div>";
	echo "<br><br>";
	echo "<div>";

	if(strlen($sn)<=0)
		echo "<div><font color='blue'>You need to input serial number</font></div>";
	else{
		$soapcli = new SoapClient("http://10.100.160.47:6000/Service.asmx?wsdl");
		//$result = $soapcli->OutSection(); // new function for get oemservice standard file.
		//print_r($result);

		$result = $soapcli->GetWoInfo(array('sn'=>$sn, 'Tres'=>''));
		//print_r($result); //Debug
		$arrRes = json_decode(json_encode($result),TRUE);
		if(!strstr($arrRes['GetWoInfoResult'],"NOSN")){
			$i=1;
			echo "<table border=0  width=100% cellpadding=0 cellspacing=1><tr bgcolor='#2894FF'><th width=15%><font color='#ffffff'>料号\工单</font></th><th width=85%><font color='#ffffff'>描述\成品料号</font></th><tr>";
			$arr = explode("|",$arrRes['GetWoInfoResult']);
			foreach($arr as $u){
				$strarr = explode("$",$u);
				if($i>0)
					echo "<tr><td>$strarr[0]</td><td>$strarr[1]</td><tr>\n";
				else
					echo "<tr bgcolor='#d0d0d0'><td>$strarr[0]</td><td>$strarr[1]</td><tr>\n";
				$i=-$i;
			}
		echo "</table>";
		}else{
			echo "<div><font color='red'>Serial number is error</font></div>";
		}
	}

	/****
	** code start for Oem Service of BIOS define and only for new SKUs
	** Written  By: Tody Guo
	** Coding date: 2019-04-11
	*/
	if(strlen($sn)>0){
		echo "<strong><font color='blue'>Generating Oem String(Beta):</font></strong></br>";
		echo "<textarea rows='23' cols='100' readonly='readonly'>";
			echo "@echo off\r\n";
			echo "\tcd /d %~dp0\r\n";
			echo "\t".'call c:\testfile\config\melock.bat'."\r\n\r\n";
			echo "\t".'cd \testfile\oemsrv\\'."\r\n\r\n";
			echo "\tOemServiceWinApp.exe SetApCtrl /clear\r\n";

			$SKU=0;  // Model name
			$CUSTOMER=0;  // customer name
			$PARTNUM=0;
			$PLTFORM=0;  // platform
			$dGPU='NOGPU';  // dGPU device ID
			$isDDSLcd=0;   // default DDS LCD is disable
			$isSB=0;   // default no Sound Blaster
			$isTHX=0;   // default no THX

			$RGBLB=0;    // check RGB LightBar
			$BL=0; // for lightbar
			$sLightBar=0; // for smart lightbar
			$ADP='NO_ADP_FOUND'; // for adpater type
			$WOOFER=0;  // for is woffer
			$IsCOM=0;    // check if it is Commercial
			$KBHASBL=1;   // check for Keyboard NO Backlight, default has backlight
			$HASSB=0;	  // check if has sound blaster label
			$SBID=0;		// for building SBID value
			$IsLCDCal=0;    // for LCD calibration
			$isRgbKb = 0;   // RGB Keyboard default is no
			$isFourZone = 0; // 4Zone keyboard definition

			$AICLock=0;  // for AIC part, only one PCS 2021-06-23, PT request

			//##################### Here add array list for special control for later##################################

			// for CHINA mode
			$ChinaList = array( "202","HAI","HAS","TVC","TMR","THT","TRQ","STD","HAC","FBS",
								"ILL","COM","207","AFS","IPG","102","ELU","MCJ","MSP"
			);

			// for RgbDefault color with customer definition
			$RgbKbDefalutColorList = array(
											"202"=>"005050",
											"HAI"=>"000050",
											"HAC"=>"000050",
											"207"=>"401500"  // added on 2020-09-14 for design book
			);

			$CustomerTurbModeList = array(
							"207"=>"1"
			);

			$CustomerNBTypeTable_35_List = array(
							"HAI","HAC","MCJ","STG","INL"
			);

			$CustomerTurbModeSKUList = array(
							"GM5MG0Y"
			);

			$DDSLCDList = array("LCDR300609-09AA",    // added on 2019-12-09
								"LCDR300609-036A"     // added on 2020-04-22
			);   // for DDS function

			$DesignBookList = array("207");

			// for Commercial SKU list
			$CommercialList = array("PF4WN2F","PF4WU1F","PF5WN2G","PF5WU1G","PF5PU1G","PF4PU1F","PF4PR1F","PF5PR1G","PF4PN2F","PF4MN2F",
									"PF4MU1F","PF5MN2G","PF5MU1G","PF4MNCF","PF5MNCG","PF5MR5G","PF5MRFG","PF4NU1F","PF5NU1G","PF4NR1F",
									"PH4TUX1","PH4TRX1","PH4TQF1","PH4TQE1","PF5LUXG","PF4LUXF","PF5ZU1G","PF4ZU1F"
			);

			// for CML-H platform and AMD Platform
			$CMLSKUList = array("MP","MQ","MR","NR","NP",
								"MG",   // CML GN20 2020-11-01
								"ZG",   // AMD GN20 2020-11-01
								"ZQ",   // AMD GN20 2020-11-01
								"NG",   // AMD GN20 2020-12-25
								"TG",   // TGL GN20 2021-03-15
								"ZN",   // TGL GN20 2021-06-11
								"TN"    // TGL GN20 2021-06-11
			);

			// for CML-H platform and AMD Platform
			$TGLSKU_UMA_List = array("TU","TR");

			// for TGL-H platform and AMD Platform
			$TGLSKU_GAME_List = array("TG", "TQ", "TN");

			// for SMBIOS Type11 list
			$NoType11List = array(  "MED","INL","MCJ","THW");

			// for 4Zone to RGB Keyboard List
			$RgbDBAList = array("DBAGK5MP5X10T02");
			$RgbFFCList = array("FFCR060121-0601","FFCR060122-0601");

			// for Soud Blaster and THX SKU
			$SB_THX_List = array("ZG");

			//############################  End of array list ########################################

			echo "\tOemServiceWinApp.exe SetApCtrl /MK 0 /WK 1 /FB 1 /RGBKB 0 /CHINA 0 /OC 0\r\n";
			echo "\tOemServiceWinApp.exe oemtdr /settdr 0xa\r\n";

			foreach($arr as $u){
				$strarr = explode("$",$u);

				// get SKU and customer code Name and so on
				switch(substr($strarr[1], 0, 3)){
					case "FBM":
					case "FGM":
						$SKU = substr($strarr[1], 4, 7);
						$CUSTOMER = substr($strarr[1],-3);
						$PARTNUM = $strarr[1];
						$PLTFORM = substr($SKU, 3, -2);
						$dGPU = substr($SKU, 5, -1);
						$SKUID = substr($SKU,6);
						break;
				}

				// get Part number
				switch(substr($strarr[0], 0, 3)){
					case "AIC":    /// this is for adpater type
						if ($AICLock==0){
							switch(substr($strarr[0], 7, 3)){
								case "330": $ADP=0; break;
								case "230": $ADP=1; break;
								case "180": $ADP=2; break;
								case "150": $ADP=3; break;
								case "120": $ADP=4; break;
								case "090": $ADP=5; break;
								case "065": $ADP=6; break;
								case "040": $ADP=7; break;
							}
							$AICLock++;
						}
						break;

					case "LIC":
						if(	strstr($strarr[1],"Sound Blaster") ||
							strstr($strarr[1],"Creative") ){
							$isSB=1;
							$HASSB=1;
						}

						if(	strstr($strarr[1],"THX Spatial") ){
							$isTHX=1;
							$HASSB=1;
						}

						if(	strstr($strarr[1],"Color Calibration") ||
								strstr($strarr[1],"Calibration")){
							$IsLCDCal=1;
						}

						if(	strstr($strarr[1],"BIOS,")){
							$bios=$strarr[0];
						}

						if(	strstr($strarr[1],"EC,")){
							$ec=$strarr[0];
						}

						break;

					case "MSK":  // check for subwoofer
						if(	strstr($strarr[1],"WOFFER") || 
							strstr($strarr[1],"WOOFER")){
							$WOOFER=1;
						}
						break;

					case "DBA":  
						// check special keywords for 4Zone Keyboard
						if( strstr(	$strarr[1],"MB TO KB BD") ||
							strstr(	$strarr[1],"KB TO MB DB") ||
							strstr(	$strarr[1],"KBME_4ZONE") ||
							strstr(	$strarr[1],"LBC,HL") ||
							strstr(	$strarr[1],"KB_BL,") ){

							if( in_array($strarr[0], $RgbDBAList) ){  // this PN for RGBKB single keyboard 2020-03-03
								$isRgbKb = 1;
							}else{
								$isFourZone = 1;
							}
						}

						// check for front LED on/off for IDP
						if( strstr(	$strarr[1],"LBC,HL")){
							$BL=1;
							$RGBLB=1;
							$sLightBar=1;
						}
					
						// check for front LED on/off for IDY
						if( strstr(	$strarr[1],"KBME_4ZONE")){
							$BL=1;
							$RGBLB=1;
							$sLightBar=1;
						}

						// check for front LED on/off for IDM
						if( strstr(	$strarr[1],"LBC DB")){  // for smart lightbar 2020-12-04, IDM no 4zone keyboard
							$BL=1;
							$RGBLB=1;
							$sLightBar=1;
						}
						break;

						// check for front LED on/off
						if( strstr(	$strarr[1],"LED BD") ||
							strstr(	$strarr[1],"LED  BD")){
							$BL=1;
						}

					case "BLM":
						// these just for front lightbar
						if (strstr($strarr[0], "BLMR45000") ||
							strstr($strarr[0], "BLMR55400")){
							$BL=1;
							$RGBLB=1;
						}
						break;

					case "FFC": 
						// these just for IDZ and IDY LightBar
						if (strstr($strarr[1], "LIGHT-BAR") ||
							strstr($strarr[1], "LIGHT_BAR") ||
							strstr($strarr[1], "LGT BAR")){
							$BL=1;
							$RGBLB=1;
						}

						// this PN for RGBKB single keyboard 2020-03-04
						if( in_array($strarr[0], $RgbFFCList)
							|| strstr($strarr[1],"1 ZONE,")
							|| strstr($strarr[1],"1_ZONE,")
							|| strstr($strarr[1],"KB BLM,RGB")){
							$isRgbKb = 1;  // RGB single keyboard 2020-03-30
						}
						break;

					case "KBD":
						// for IDF & IDG
						if( strstr($strarr[1],"WOBLM") ||
							strstr($strarr[1],"WO BLM")){
							$KBHASBL=0;
						}

						if( strstr($strarr[1],"340mm")){
							$isRgbKb = 1;  // RGB single keyboard 2020-03-30
						}
						break;

					case "LCD":
						if( in_array($strarr[0], $DDSLCDList) ){
							$isDDSLcd = 1;
						}

						// if(strstr($strarr[1],"sRGB")){
							// $IsLCDCal=1;
						// }
						break;
				}
			}
			// end of get part number

			// Checking is single RGB keyboard
			if($isRgbKb){
				if(array_key_exists($CUSTOMER, $RgbKbDefalutColorList)){
					echo "\tOemServiceWinApp.exe RGBKB /set ".$RgbKbDefalutColorList["$CUSTOMER"]."\r\n";
				}else{
					echo "\tOemServiceWinApp.exe RGBKB /set 005050\r\n";  // default is water blue
				}
				echo "\tOemServiceWinApp.exe SetApCtrl /RGBKB 1\r\n";
			}

			if($isFourZone && !$isRgbKb){
				echo "\tOemServiceWinApp.exe kblbid /setkbl 1\r\n";
			}

			// Checking is China mode
			if(in_array($CUSTOMER, $ChinaList)){  // 2021-04-13: remove platform check
				echo "\tOemServiceWinApp.exe SetApCtrl /CHINA 1\r\n";
			}

			if($HASSB){
			// now using mysql database to query information of ssid
			$db = new mysql();

			if(	$SKU == "GK5CP6T" ||
				$SKU == "GK5CQ7T") {
				$db->query("select * from sb_ssid where SKU='${SKU}' and isIntel=1");
			} else {
				$db->query("select * from sb_ssid where SKU='${SKU}' and isIntel=0");
			}
			$num = $db->db_num_rows();
			if ($num==0){
				$SSID="SKU_NOT_FOUND_:(";
			}else{
				$row = $db->fetch_assoc();
				$SSID=$row['SSID'];
			}
			$db->close();

			if($WOOFER && !in_array($PLTFORM, $CMLSKUList)){
				$SBID=$SSID.substr(${SKU},-1)."1111500";
			}else if(in_array($PLTFORM, $TGLSKU_GAME_List)){   /// this code for TGL SB Audio
				$SBID=$SSID.substr(${SKU},-1)."1100600";
			}else if(in_array($PLTFORM, $CMLSKUList)){   /// this code for CML THX Audio
				$SBID=$SSID.substr(${SKU},-1)."1110100";
			}else if(in_array($PLTFORM, $TGLSKU_UMA_List)){   /// this code for TGL UMA THX Audio
				$SBID=$SSID.substr(${SKU},-1)."1110100";
			}else
				$SBID=$SSID.substr(${SKU},-1)."1100500";

			//W/A for diff sku use diff cover
			if ($SKU=="GK5CP6X" && ($CUSTOMER=='202' || $CUSTOMER == "TMR"))
				$SBID=str_replace('X', 'V', $SBID);
		}

			// define the SKU is Commercial SKU
			if(in_array($SKU, $CommercialList)){
				$IsCOM=1;
			}

			// this is for backlight control
			echo "\tOemServiceWinApp.exe SetApCtrl /BL ${BL}\r\n";
			if($RGBLB){
				switch(substr($SKU,6)){
					case 'Y':
					case 'P':
					case 'M':
						if($sLightBar){
							echo "\tOemServiceWinApp.exe rgblb /setmode 255\r\n";
						}else{
							echo "\tOemServiceWinApp.exe rgblb /setmode ${RGBLB}\r\n";
						}
						if(!in_array($PLTFORM, $CMLSKUList)){
							echo "\tOemServiceWinApp.exe SetApCtrl /CHINA 1\r\n";
						}
						break;
					case 'X':
						if(!in_array($PLTFORM, $CMLSKUList)){
							echo "\tOemServiceWinApp.exe RgbLb /SetRGB 8 20 32\r\n";
						}
						break;
					default:
						echo "\tOemServiceWinApp.exe rgblb /setmode ${RGBLB}\r\n";
						break;
				}
			}

			if(!in_array($PLTFORM, $CMLSKUList) && !in_array($PLTFORM, $TGLSKU_GAME_List)){
				echo "\tOemServiceWinApp.exe Subwoofer /set ${WOOFER}\r\n";
			}

			// [[ this code is for TURBO MODE
			if($IsCOM) {
				// 2021-06-22 remove for LU ZU SKU
				//if($KBHASBL &&  !in_array($PLTFORM, $TGLSKU_UMA_List) && !in_array($PLTFORM, $TGLSKU_GAME_List)) { echo "\tOemServiceWinApp.exe kblbid /setkbl 1\r\n"; }
				echo "\tOemServiceWinApp.exe KBLSupport /Set ${KBHASBL}\r\n";
				echo "\tOemServiceWinApp.exe AdpType /set ${ADP}\r\n";
			}else{
				switch($SKU){   /// turbo mode area start.........................
					case "GK7CP7S":
						echo "\tOemServiceWinApp.exe AdpType /set ${ADP}\r\n";
						echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";
						break;

					case "GK5CP6T":  // intel
					case "GK5CQ7T":  // intel
						echo "\tOemServiceWinApp.exe AdpType /set 2\r\n";
						echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";
						break;

					case "GK7CP6S":  // these SKUs only for turbomode enable with 180w adp
					case "GK7CP6R":
					case "GK5CP6Z":
					case "GK5CP6X":
					case "GK5CP6V":
					case "GK5CR0V":  // add 2019-04-16
					case "GK5CR0X":
					case "GK5CP7Y":  // add 2019-08-11
					case "GK5CP6Y":
					case "GK5CR0Y":
					case "GM7CP7P":
					case "GM7CP6P":
					case "GK7CR0R":
					case "GK7NR0R": // add 2020-04-20
					case "GK5NR0O":
						echo "\tOemServiceWinApp.exe AdpType /set 2\r\n";   // 180w enable , when use 150w adp
						echo "\tOemServiceWinApp.exe turbomode /set 1\r\n";
						break;

					case "GK7CP5R": // these SKUs only for turbomode by adpater
					case "GK5CP5Z":
					case "GK7MP5R":
					case "GK5MP5X":
					case "GK5MP5V":
					case "GK5MP5O":
					case "GK5MRFX":
					case "GK5MRFV":
					case "GK5MRFR":
					case "GK5MRFO":
					case "GK7NPFR":
					case "GK5NPFO":
					case "GK7NP5R":
					case "GK5NP5O":
					case "GK5NP5V":  // added on 2020-05-21
					case "GK5NRFO":  // added on 2020-12-03
						echo "\tOemServiceWinApp.exe AdpType /set ${ADP}\r\n";
						if($ADP==3){  // 150w adp
							echo "\tOemServiceWinApp.exe turbomode /set 1\r\n";
						}else{  // 120w adp
							echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";
						}
						break;

					default:  // default for automatic check without special request
						if(in_array($PLTFORM, $CMLSKUList)){
							echo "\tOemServiceWinApp.exe AdpType /set ${ADP}\r\n";
							if($ADP<4){ // more than 120w adp is enable
								echo "\tOemServiceWinApp.exe turbomode /set 1\r\n";
							}else{
								echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";
							}
						}else if($ADP<2){  // 180w adp
							echo "\tOemServiceWinApp.exe AdpType /set 2\r\n";
							echo "\tOemServiceWinApp.exe turbomode /set 1\r\n";
						}else{
							echo "\tOemServiceWinApp.exe AdpType /set ${ADP}\r\n";
							echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";
						}
						break;
				}   /// trubo mode area ending......................... ]]
			}

			if($IsLCDCal){
				echo "\tOemServiceWinApp.exe ColorCalibration /set 1\r\n";
			}else{
				echo "\tOemServiceWinApp.exe ColorCalibration /set 0\r\n";  // add on 2021-05-28 for fix Thirdwave APP issue
			}

			if(in_array($PLTFORM, $CMLSKUList)){
				switch($SKUID)
				{
					case "R":
						echo "\tOemServiceWinApp.exe Modelid /set 0\r\n";
						break;
					case "X":
						echo "\tOemServiceWinApp.exe Modelid /set 1\r\n";
						break;
					case "V":
						echo "\tOemServiceWinApp.exe Modelid /set 2\r\n";
						break;
					case "O":
						echo "\tOemServiceWinApp.exe Modelid /set 3\r\n";
						break;
					case "P":
						echo "\tOemServiceWinApp.exe Modelid /set 4\r\n";
						break;
					case "S":
						echo "\tOemServiceWinApp.exe Modelid /set 5\r\n";
						break;
					case "Y":
						echo "\tOemServiceWinApp.exe Modelid /set 6\r\n";
						break;
					case "W":
						echo "\tOemServiceWinApp.exe Modelid /set 7\r\n";
						break;
					case "M":
						echo "\tOemServiceWinApp.exe Modelid /set 8\r\n";  //2020-11-01
						break;
				}
			}

			// this code is DDS switch for oemservice, depend on SKU and LCD
			if ($isDDSLcd){
				switch($dGPU){
					case "0":
					case "7":
					case "H":
					case "8":
						echo "\tOemServiceWinApp.exe ddssupport /set 1\r\n";
						break;
				}
			}

			// this code is for sound blaster and thx sku
			if (in_array($PLTFORM, $SB_THX_List)){
				if ($isSB) {
					echo "\tOemServiceWinApp.exe AudioEffect /set 1\r\n";
				}else if ($isTHX) {
					echo "\tOemServiceWinApp.exe AudioEffect /set 0\r\n";
				} else {
					echo "::Default is THX for ZG\r\n";
					echo "\tOemServiceWinApp.exe AudioEffect /set 0\r\n";
				}
			}

			if(in_array($CUSTOMER, $NoType11List)){   // Here is for special customer
				echo "\r\n::: NO OS 11 12\r\n";
				echo "\r\n\t::AMIDEWINx64.exe /OS 11 \"${PARTNUM}\"\r\n";
				echo "\t::AMIDEWINx64.exe /OS 12 \"${SKU}\"\r\n";
			}else{
				// this is for basic dmi information in SMBIOS OS type
				echo "\r\n\tAMIDEWINx64.exe /OS 11 \"${PARTNUM}\"\r\n";
				echo "\tAMIDEWINx64.exe /OS 12 \"${SKU}\"\r\n";
			}

			// this is for sound blaster
			if($HASSB)
				echo "\tAMIDEWINx64.exe /OS 16 \"${SBID}\"\r\n";

			echo "\r\n::: Need filled from Request form\r\n";

			// [[ this code is for OFFICE MODE
			if($IsCOM){  // this is for commercial sku
				if($CUSTOMER=="MCJ" && $SKU == "PH4TUX1"){
					echo "\tOemServiceWinApp.exe Nbtype /Table 34\r\n"; // 2021-03-12 change to 34
				}else{
					echo "\tOemServiceWinApp.exe Nbtype /Table 33\r\n";
				}

				if(!in_array($PLTFORM, $TGLSKU_UMA_List) && !in_array($PLTFORM, $TGLSKU_GAME_List)){
					echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";  // set default to 0 for commercial
				}

			} else if(in_array($CUSTOMER, $DesignBookList)){   //2020-07-04, added for Design book
				if(in_array($PLTFORM, $TGLSKU_GAME_List)){
					echo "\tOemServiceWinApp.exe Ndtype /set 1\r\n"; //2021-05-21, added for Design book
				}
				echo "\tOemServiceWinApp.exe Nbtype /Table 35\r\n";

				if(in_array($SKU, $CustomerTurbModeSKUList)){
					echo "\tOemServiceWinApp.exe turbomode /set ".$CustomerTurbModeList["$CUSTOMER"]."\r\n";
				}else if(in_array($PLTFORM, $TGLSKU_GAME_List)){
					echo "\tOemServiceWinApp.exe turbomode /set 1\r\n";
				}else{
					echo "\tOemServiceWinApp.exe turbomode /set 0\r\n";
				}
			} else {
				if( in_array($CUSTOMER, $CustomerNBTypeTable_35_List)){  // Here is for special customer
					echo "\tOemServiceWinApp.exe Nbtype /Table 35\r\n";
				}else if( $CUSTOMER=="TVC" && in_array($PLTFORM, $TGLSKU_GAME_List)){  // here is for tvc
					echo "\tOemServiceWinApp.exe Nbtype /Table 35\r\n";
				}else{  // here is for standard
					echo "\tOemServiceWinApp.exe Nbtype /Table 36\r\n";
				}
			}
			
			if ($AICLock>1){
				echo "\t:::: Found more Adapters, please check actual corpse\r\n";
			}

			// End of OFFICE MODE ]]

			echo "\r\n";
		echo "</textarea>";

		if(strlen($bios)>5 && strlen($ec)>5){
			$msg=file_get_contents("http://10.100.160.245/bios_download_mon.php?act=a&pn=${PARTNUM}&bios=${bios}&ec=${ec}");
			if(!strstr($msg, "PASS")){
				echo "<script>alert('任务没有传输到中转服务器，请注意！！！');</script>";
			}
		}

	/****
	** End onf Oem Service of BIOS define
	*/
	}
	echo "</div>";
	include 'bottom.php';
	echo "  </body>";
	echo "</html>";
?>